Usual algorithm